#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
int main()
{
    // int fd = open("log.txt", O_WRONLY | O_CREAT | O_APPEND, 0666);
    // const char* message = "hello file\n";
    // int cnt = 5;
    // while(cnt--)
    // {
    //     write(fd, message, strlen(message));
    // }
    // close(fd);
    // int fd = open("log.txt", O_WRONLY | O_CREAT | O_TRUNC, 0666);
    // const char* message = "hello file\n";
    // write(fd, message, strlen(message));
    // close(fd);
    //int fd = open("log.txt", O_WRONLY | O_CREAT, 0666);
    //const char* message = "hello file\n";
    //const char* message = "xxx\n";

    //write(fd, message, strlen(message));
    //close(fd);
    return 0;
}